import LocalStorage from '../localStorage'

const TokenKey = 'auth_token'
const UserKey = 'user'

export function getToken() {
  return LocalStorage.get(TokenKey)
}

export function setToken(token) {
  return LocalStorage.set(TokenKey, token)
}

export function removeToken() {
  return LocalStorage.remove(TokenKey)
}

export function getUser() {
  return LocalStorage.get(UserKey)
}

export function setUser(user) {
  return LocalStorage.set(UserKey, window.JSON.stringify(user))
}

export function removeUser() {
  return LocalStorage.remove(UserKey)
}
